export function uploadFile(mimeType: string): Promise<File> {
  return new Promise<File>(resolve => {
    const input = document.createElement('input');
    input.type = 'file';
    input.accept = mimeType;
    input.addEventListener('change', () => {
      resolve(input.files![0]);
    });
    input.click();
  });
}
